package com.edu.mapper;

import com.edu.bean.Book;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BookMapper {

    @Select("select * from book where bookId = #{bookId}")
    Book selectBookById(int bookId);

    @Select("select * from book")
    List<Book> selectAllBooks();

    @Delete("delete from book WHERE bookId = #{bookId}")
    int deleteBook(int bookId);
}
